﻿using IR.Controller.ModelControllers;
using IR.WPF.ViewModels.LandingViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IR.WPF.UI.ViewModels
{
    public class VMUserHeader : ViewModelBase
    {
        private VMUser[] _users = new VMUser[0];

        public VMUser[] Users
        {
            get
            {
                //Make this async
                _users = CUser.QueryUsers(null)
                    .OrderBy(cu => cu.LName)
                    .Select(user => new VMUser(user))
                    .ToArray();

                return _users;
            }
        }
    }
}
